
package com.chongchong.user.feign;

import com.chongchong.user.entity.User;
import com.chongchong.core.tool.api.R;
import com.chongchong.user.entity.UserInfo;
import com.chongchong.user.entity.UserOauth;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Feign失败配置
 *
 * @author
 */
@Component
public class IUserClientFallback implements IUserClient {

	@Override
	public R<UserInfo> userInfo(Long userId) {
		return R.fail("未获取到账号信息");
	}

	@Override
	public R<UserInfo> userInfo(String tenantId, String account, String password) {
		return R.fail("未获取到账号信息");
	}

	@Override
	public R<UserInfo> userInfo(String tenantId, String account) {
		return R.fail("未获取到账号信息");
	}

	@Override
	public R<UserInfo> userAuthInfo(UserOauth userOauth) {
		return R.fail("未获取到账号信息");
	}

	@Override
	public R<Boolean> saveUser(User user) {
		return R.fail("创建用户失败");
	}

	@Override
	public R<Boolean> updateUser(User user) {
		return R.fail("修改用户失败");
	}

	@Override
	public R<Boolean> saveOrUpdateUserList(List<User> userList) {
		return R.fail("创建用户失败");
	}

	@Override
	public R<List<User>> findByRoleName(String roleName) {
		return R.fail("未获取到账号信息");
	}

}
